<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        div{
            display: flex;
            align-items: flex-start;
        }
        .fa{
            color:chocolate;
            cursor: pointer;
        }
    </style>
    <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/4.7.0/css/font-awesome.min.css" integrity="sha512-SfTiTlX6kk+qitfevl/7LibUOeJWlt9rbyDn92a1DqWOw9vWG2MFoays0sgObmWazO5BQPiFucnnEAjpAB+/Sw==" crossorigin="anonymous" referrerpolicy="no-referrer" />
</head>
<body>
    <div>
        <i class="fa fa-times-circle"></i>
        <img src="./二维码.png" alt="" class="img">
    </div>

    <script>
        var faEle = document.querySelector('.fa')
        var imgEle = document.querySelector('.img')
        var divEle = document.querySelector('div')
        faEle.onclick = function(){
            divEle.style.display = 'none'
        }
    </script>
</body>
</html>